import '../ai/ai_date_entity.dart';
import 'king_entity.dart';

class KingListEntity {
  int? saveCount;
  int? sendCount;
  int? dayRank;
  int? monthRank;
  int? weekRank;
  List<DayList>? dayList;
  List<KingEntity>? matchList;

  KingListEntity({this.saveCount, this.sendCount, this.dayList, this.matchList});

  KingListEntity.fromJson(Map<String, dynamic> json) {
    saveCount = json['saveCount'];
    sendCount = json['sendCount'];
    dayRank = json['dayRank'];
    monthRank = json['monthRank'];
    weekRank = json['weekRank'];
    if (json['dayList'] != null) {
      dayList = <DayList>[];
      json['dayList'].forEach((v) {
        dayList!.add(new DayList.fromJson(v));
      });
    }
    if (json['list'] != null) {
      matchList = <KingEntity>[];
      json['list'].forEach((v) {
        matchList!.add(new KingEntity.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['saveCount'] = this.saveCount;
    data['sendCount'] = this.sendCount;
    data['dayRank'] = this.dayRank;
    data['monthRank'] = this.monthRank;
    data['weekRank'] = this.weekRank;
    if (this.dayList != null) {
      data['dayList'] = this.dayList!.map((v) => v.toJson()).toList();
    }
    if (this.matchList != null) {
      data['list'] = this.matchList!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}
